
/**
 * An abstract class used to define basic properties all entities must have.
 * 
 * @author      Adrian Alberto
 * @version     0.01
 */

import java.awt.geom.*;
import java.util.*;
public abstract class GridEntity
{
    private int myCoordX;
    private int myCoordY;
    protected char mySymbol;

    /**
     * Constuctor for GridEntity
     */
    public GridEntity(char symbol, int coordX, int coordY)
    {
        myCoordX = coordX;
        myCoordY = coordY;
        mySymbol = symbol;
    }

    public abstract void step();

    /**
     * The remove() method removes self from the gird
     *  
     * @pre     
     * @param   none
     * @return  none     
     * @post    removes from the grid
     */
    public void remove(){
        //Move object off of the grid. Grid will automatically clean up.
        setCoordX(-5);
        setCoordY(-5);
    }

    /**
     * The getSymbol method gets the symbol for the object
     * 
     * @pre     mySymbol
     * @param   none
     * @return  mySymbol    
     * @post    returns Symbol of the Entity
     */
    public char getSymbol(){
        return mySymbol;    
    }

    /**
     * The getCoordX() method gets the xCoordinate
     * 
     * @pre     myCoordX
     * @param   none
     * @return  myCoordX    
     * @post    returns xCoordinate of the Entity
     */
    public int getCoordX(){
        return myCoordX;
    }

    /**
     * The getCoordY() method gets the yCoordinate
     * 
     * @pre     myCoordY
     * @param   none
     * @return  myCoordY    
     * @post    returns yCoordinate of the Entity
     */
    public int getCoordY(){
        return myCoordY;
    }

    /**
     * The setCoordX() method sets the xCoordinate
     * 
     * @pre     myCoordX
     * @param   int x 
     * @return  none     
     * @post    sets the xCoordinate with the one passed int
     */
    public void setCoordX(int x){
        myCoordX = x;
    }

    /**
     * The setCoordY() method sets the yCoordinate
     * 
     * @pre     myCoordY
     * @param   int y 
     * @return  none     
     * @post    sets the yCoordinate with the one passed int
     */
    public void setCoordY(int y){
        myCoordY = y;
    }
}

